import Vue from "vue";
import VueRouter from "vue-router";


Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "index",
    component: () => import("@/views/IndexPage")
  },
  {
    path: "/zhaomu",
    name: "zhaomu",
    component: () => import("@/views/DaiLi")
  },
  {
    path: "/about",
    name: "about",
    component: () => import("@/views/AboutUs")
  },
  {
    path: "/daili",
    name: "daili",
    component: () => import("@/components/DaiLi")
  },
  {
    path: "/news",
    name: "news",
    component: () => import("@/views/NewsList")
  },
  {
    path: "/more/:classid",
    name: "more",
    component: () => import("@/views/NewsMore")
  },
  {
    path: "/newsshow/:newsid",
    name: "newsshow",
    component: () => import("@/views/NewsShow")
  },
  {
    path: "/product",
    name: "product",
    component: () => import("@/views/ProDucts")
  },
  
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  scrollBehavior (to, from, next) {
    return {
      x: 0,
      y:0
    }
  },
  routes
});

export default router;
